<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>user</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  <link rel="stylesheet" href="/layuiadmin/layui/css/layui.css" media="all">
  <link rel="stylesheet" href="/layuiadmin/style/admin.css" media="all">
  <link rel="stylesheet" href="/layuiadmin/style/template.css" media="all">
</head>
<body>

  <div class="layui-fluid">
    <div class="layadmin-caller">

      <div class="caller-contar">
          <c:forEach items="${requestScope.users}" var="user">
					<div class="caller-item">	
                        <a lay-href="/chat/${user.uid}" ><img src="${user.image}" alt="" class="caller-img caller-fl" ></a>
						<div class="caller-main caller-fl">       
                            <p><strong><a lay-href="/chat/${user.uid}">${user.username}
                                <c:forEach items="${requestScope.message}" var="message">
                                    <c:if test="${message.username==user.uid && message.number>0}">
                                        <span class="layui-badge">${message.number}</span>
                                    </c:if>
                                </c:forEach>
                            </a></strong><i class="layui-icon layui-icon-star-fill" style="margin-left: 15px" lay-href="/liuyan/all?fromName=${requestScope.name}&toName=${user.uid}"></i><em  lay-href="/liuyan/all?fromName=${requestScope.name}&toName=${user.uid}">留言</em>
                            <a lay-href="/chatRecord/${user.uid}"><i class="layui-icon layui-icon-file" style="font-size: 15px; color: #1E9FFF; margin-left: 15px"></i>聊天记录</a>
                            </p>
							<a lay-href="/chat/${user.uid}"><p class="caller-adds"><i class="layui-icon layui-icon-dialogue"></i>${user.email}</p></a>
                        </div>
                    </div>
          </c:forEach>
      </div>
    </div>
  </div>
  <script src="/layuiadmin/layui/layui.js"></script>
 <script>
  layui.config({
    base: '/layuiadmin/' //静态资源所在路径
  }).extend({
    index: 'lib/index' //主入口模块
  }).use(['index', 'laypage','layer'], function(){
    var laypage = layui.laypage,layer = layui.layer;
      laypage.render({
    elem: 'demo1'
    ,count: 70 //数据总数
  });

  });
  </script>
</body>
</html>